import React from 'react'
import {
    HashRouter,
    Switch,
    Route
} from "react-router-dom"
import GoodsList from "./GoodsList"
import Details from "./Details"
//路由
class Router extends React.Component{
    render(){
      return(
        <HashRouter>  
          {/* 排他路由 */}
          <Switch>
            <Route path="/details" component={Details}/>
            <Route path="/" component={GoodsList}/>
            {/* 打破路由包容性  exact */}
          </Switch>
        </HashRouter>
      )
    }
  }
  
  export default Router;